package com.wanmait.demo.service.impl;

import com.github.pagehelper.PageInfo;
import com.wanmait.demo.mapper.UserinfoMapper;
import com.wanmait.demo.pojo.Userinfo;
import com.wanmait.demo.service.UserService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
@Service
@Transactional(rollbackFor = Exception.class)
 public class UserServiceimpl implements UserService {
    //zjj
    @Override
    public Userinfo getUserInfoForPersonCenter(Integer userid) {
        return userinfoMapper.getUserInfoForPersonCenter(userid);

    }



@Resource
private UserinfoMapper userinfoMapper;

    @Override
    public void insert(Userinfo object) {

    }

    @Override
    public void delete(Integer id) {

    }

    @Override
    public void delete(String ids) {

    }

    @Override
    public void update(Userinfo object) {

    }

    @Override
    public Userinfo findById(Integer id) {
        return null;
    }

    @Override
    public List<Userinfo> findAll() {
        return null;
    }

    @Override
    public PageInfo<Userinfo> findPage(int pageNum, int pageSize) {
        return null;
    }


    @Override
    public Userinfo findUser(Userinfo userinfo) {
        return userinfoMapper.finduser(userinfo);
    }

    @Override//尹山坤
    public void updatauserpass(int userid,String userpass) {
        userinfoMapper.updatauserpass(userid,userpass);
    }

    @Override
    public Userinfo checkusername(String username) {  //尹山坤检查用户名是否重复
        return userinfoMapper.checkusername(username);

    }

    @Override
    public void insertuser(String username, String userpass,String phonenum) {
        userinfoMapper.insertuser(username,userpass,phonenum); //尹山坤  注册新用户
    }

    @Override
    public Userinfo checkphonenum(String phonenum) {
        return userinfoMapper.checkphonenum(phonenum);
    }
}
